<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台（PHP版）
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码，建议反馈是我们前进的动力
// | 开源版本可自由商用，可去除界面版权logo
// | gitee下载：https://gitee.com/likeshop_gitee/likeadmin
// | github下载：https://github.com/likeshop-github/likeadmin
// | 访问官网：https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------

namespace app\adminapi\validate\room;


use app\common\validate\BaseValidate;


/**
 * 公寓设备记录验证器
 * Class RoomApartmentDeviceLogValidate
 * @package app\adminapi\validate\room
 */
class RoomApartmentDeviceLogValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'cid' => 'require',
        'rid' => 'require',
        'device_id' => 'require',
        'coefficient' => 'require',
        'price' => 'require',
        'base_number' => 'require',
        'reading' => 'require',
        'use_total' => 'require',
        'lift_fee' => 'require',
        'second_pressure_fee' => 'require',
        'total_fee' => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'cid' => '院区',
        'rid' => '房间',
        'device_id' => '设备',
        'coefficient' => '设备系数',
        'price' => '水电价',
        'base_number' => '底数',
        'reading' => '读数',
        'use_total' => '使用量',
        'lift_fee' => '电梯费',
        'second_pressure_fee' => '二次压力费',
        'total_fee' => '总费用',
    ];


    /**
     * @notes 添加场景
     * @return RoomApartmentDeviceLogValidate
     * @author likeadmin
     * @date 2024/02/26 16:32
     */
    public function sceneAdd()
    {
        return $this->only(['cid','rid','device_id','coefficient','price','base_number','reading','use_total','lift_fee','second_pressure_fee','total_fee']);
    }


    /**
     * @notes 编辑场景
     * @return RoomApartmentDeviceLogValidate
     * @author likeadmin
     * @date 2024/02/26 16:32
     */
    public function sceneEdit()
    {
        return $this->only(['id','cid','rid','device_id','coefficient','price','base_number','reading','use_total','lift_fee','second_pressure_fee','total_fee']);
    }


    /**
     * @notes 删除场景
     * @return RoomApartmentDeviceLogValidate
     * @author likeadmin
     * @date 2024/02/26 16:32
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return RoomApartmentDeviceLogValidate
     * @author likeadmin
     * @date 2024/02/26 16:32
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}